Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@amaui/subscription
Advanced tools
Subscription methods management
Very simple code Modern code Junior friendly Typescript Made with :yellow_heart:
// yarn
yarn add @amaui/subscription
// npm
npm install @amaui/subscription
import AmauiSubscription from '@amaui/subscription';
// Make a new subscription instance
// with an optional initial value
const amauiSub = new AmauiSubscription('🙂');
// Value
amauiSub.value;
// '🙂'
const method = (...value) => console.log('Yup, I got it ', ...value);
const method1 = value => console.log('Yup, I got it as well ', value);
// Methods subscribe
amauiSub.subscribe(method);
amauiSub.subscribe(method1);
// Emit a value to all subscribed methods
// a value always emitted as arguments received by emit method
amauiSub.emit('🌱', '🌱', '🌱', '🌱');
// method, log:
// Yup, I got it 🌱 🌱 🌱 🌱
// method1, log:
// Yup, I got it as well 🌱
// Methods unsubscribe
amauiSub.unsubscribe(method);
amauiSub.unsubscribe(method1);
// or with anonymous method
const subscription = amauiSub.subscribe(value => console.log(value));
subscription.unsubscribe();
Install
yarn
Test
yarn test
Build
yarn build
Might be soon...
FAQs
Subscription method management
The npm package @amaui/subscription receives a total of 9 weekly downloads. As such, @amaui/subscription popularity was classified as not popular.
We found that @amaui/subscription demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.